<template>
  <menuComp :menu="menu"></menuComp>
  <roadwayForm v-model="showRoadwayForm"></roadwayForm>
  <equipmentForm v-model="showEquipmentForm"></equipmentForm>
  <groupForm v-model="showGroupForm"></groupForm>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import menuComp from '../components/menuComp.vue'
import roadwayForm from './roadwayForm.vue'
import equipmentForm from './equipmentForm.vue'
import groupForm from './groupForm.vue'
const showRoadwayForm = ref(false)
function handleRoadway() {
  showRoadwayForm.value = true
}

const showEquipmentForm = ref(false)
function handleEquipment() {
  showEquipmentForm.value = true
}

const showGroupForm = ref(false)
function handleGroup() {
  showGroupForm.value = true
}

const menu = {
  label: '添加',
  children: [
    { label: '分组', shortcutKey: '', click: handleGroup },
    { label: '巷道', shortcutKey: '', click: handleRoadway },
    { label: '设备', shortcutKey: '', click: handleEquipment }
  ]
}
</script>
<style lang="scss" scoped></style>
